<include file=".:Common:header" />
<script language="javascript">
$(function(){
	$('#UserForm').form({ 
		success:function(data){
			var data = runJson(data);
			if(data.status == 0){
				alertText(data.info, 'error');
			}else{
				alertText(data.info, 'success', '{:U('Index/porfile')}');
			}
		},
		onSubmit : function(){
			if($.trim($('#password').val())){
				if($.trim($('#password').val()) != $.trim($('#password2').val())){
					alert('两次输入的密码不一致！');
					return false;
				}
			}
			return true;
		}  
	}); 
}); 
</script>
<style type="text/css">
.tableform th { padding-left:10px; text-align:left; background:#f2f2f2; }
.tableform td { border-right:none; }
</style>
    <div id="wrapper" class="wrapper clear">
    	<div class="main">
            <div class="report_title">
            	<h3>用户信息设置</h3>
          	</div>
            <form id="UserForm" action="{:U('home/Index/porfile')}&ajax=1" method="post">
            <div style="padding:10px; border-top: 1px solid #B3BDCA;border-bottom: 1px solid #B3BDCA; background:#f9f9f9">
            <table width="96%" class="tableform" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <th scope="row">用户名：</th>
                <td>
                <span style="float:right; color:#999999;">您上次登录系统时间是<?php echo $_SESSION['last_login_time'];?>，IP是<?php echo $_SESSION['last_login_ip'];?>。</span>
                <?php echo $_SESSION['user']; ?>
                </td>
              </tr>
              <tr>
                <th scope="row">手机号码：</th>
                <td>
                <input type="text" name="telephone" id="telephone" value="{$userinfo.telephone}" style="width:200px;" class="easyui-validatebox input text" validType="length[11,11]" invalidMessage="手机号码输入不合法！"/>
                </td>
              </tr>
              <tr>
                <th scope="row">邮箱：</th>
                <td>
                <input type="text" name="email" id="email" style="width:200px;" value="{$userinfo.email}" class="easyui-validatebox input text" validType="email" invalidMessage="电子邮箱格式不正确！" />
                </td>
              </tr>
              <tr>
                <th scope="row">新密码：</th>
                <td>
                <input type="text" name="password" id="password" style="width:200px;" value="" class="easyui-validatebox input text"  validType="length[5,20]" invalidMessage="密码必须由5-20位任意字符组成！" />
                <span style="color:#999999; padding-left:10px;">密码不修改请留空。</span>
                </td>
              </tr>
              <tr>
                <th scope="row" style="border-bottom:none;">确认新密码：</th>
                <td style="border-bottom:none;">
                <input type="text" name="password2" id="password2" style="width:200px;" value="" class="easyui-validatebox input text"  invalidMessage="密码必须由5-20位任意字符组成！" validType="length[5,20]" />
                </td>
              </tr>
            </table>
            </div>
            <div class="form-div" style="text-align:center; padding:10px;">
                <input style="height:30px" type="submit" value="保存设置" class="submit" onclick="return $('UserForm').form('validate');"/>
                <input style="height:30px" type="reset" value="重置" class="cancel"/>
              </div>
              </form>
        </div>
        
    </div>
<include file=".:Common:footer" /> 